Template Matching
Classification using the Template Matching Algorithm
As described in the Reference Book > Template Matching you can apply templates generated with eCognitions Template Matching Editor to your imagery.
Please refer to our template matching videos in the eCognition Knowledge-Base covering a variety of application examples and workflows.
The typical workflow comprises two steps. Template generation using the template editor, and template application using the template matching algorithm.
To generate templates:
- Create a new project
- Open View > Windows > Template Editor
- Insert samples in the Select Samples tab
- Generate template(s) based on the first samples selected
- Test the template on a subregion resulting in potential targets
- Review the targets and assign them manually as correct, false or not sure (note that targets classified as correct automatically become samples)
- Regenerate the template(s) on this improved sample basis
- Repeat these steps with varying test regions and thresholds, and improve your template(s) iteratively
- Save the project (saves also the samples)
To apply your templates:
- Create a new project/workspace with imagery to apply the templates to
- Insert the template matching algorithm in the Process Tree Window
- To generate the a temporary layer with correlation coefficients (output layer) you need to provide
- the folder containing the template(s)
- the layer that should be correlated with this template
- To generate in addition a thematic layer with points for each target you need to provide a threshold for the correlation coefficient for a valid target
- Apply the template matching algorithm
- Segment your image based on the thematic layer and use the “assign class by thematic layer” algorithm to classify your objects
- Review your targets using the image object table (zoom in and make only a small region of the image visible, and any object you select in the table will be visible in the image view, typically centered).